<template>
    <div>
        <!-- 非属性特性透传 -->
        <input type="text" :value="value" @input="onInput" v-bind="$attrs" />
    </div>
</template>

<script>
export default {
    // 禁止属性继承
    inheritAttrs: false,
    props: {
        value: {
            type: String,
            default: "",
        },
    },
    data() {
        return {};
    },
    methods: {
        onInput(e) {
            this.$emit("input", e.target.value);
            // this.diapatch("el-form-item", "validate");
            this.$parent.$emit("validate");
        },
    },
};
</script>

<style lang="scss" scoped></style>
